package com.rpay.common.enums;

/**
 * Title：
 * Description
 *
 * @author fxg06 on 2018/4/29
 * @version 1.0
 */
public enum SmsCodeEnum {
    REGISTER("REGISTER", "注册"),
    MODIFY_PWD("MODIFY_PWD", "修改密码"),
    FORGET_PWD("FORGET_PWD", "忘记密码"),

    WALLET("WALLET", "设置钱包"),

    WITHDRAW("WITHDRAW", "提现"),
    CONVERT("CONVERT", "转换"),
    TRANSFER("TRANSFER", "互转"),

    TRADE_PWD("TRADE_PWD", "设置交易密码"),

    CONTRACT("CONTRACT", "选择合约"),

    BIND("BIND", "绑定手机或邮箱");

    private String code;
    private String desc;

    SmsCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 判断是否包含
     *
     * @param type
     * @return
     */
    public static boolean isContain(String type) {
        for (SmsCodeEnum smsEnum : SmsCodeEnum.values()) {
            if (smsEnum.getCode().equals(type)) {
                return true;
            }
        }
        return false;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
